| Impression Publisher !Run File
| ------------------------------
| (c) 1989-1996 Computer Concepts Limited.

WimpSlot -min 672K -max 672K
Set ImpressionPublisher$Dir <Obey$Dir>
Set ImpressionPublisher$Resources <ImpressionPublisher$Dir>
Set Impression$Path <ImpressionPublisher$Dir>.!Run
Set ImpressionPublisher$Path <ImpressionPublisher$Dir>.!Run

Run <ImpressionPublisher$Dir>.RiscOSV
IF RiscOS$Version < 300 THEN RMEnsure ColourTrans 0.52 RMLoad <ImpressionPublisher$Dir>.RMStore.Colours
IF RiscOS$Version < 300 THEN RMEnsure ColourTrans 0.52 Error 0 You need ColourTrans 0.52 or later
IF RiscOS$Version < 300 THEN RMEnsure FontManager 2.42 Error 0 You need FontManager 2.42 or later. Locate !Fonts (on the Fonts disc).
IF RiscOS$Version >= 300 THEN RMEnsure ColourTrans 0.96 Error 0 You need ColourTrans 0.96 or later
IF RiscOS$Version >= 300 THEN RMEnsure FontManager 2.98 Error 0 You need FontManager 2.98 or later
IF "<Font$Path>"="" THEN Error 0 Fonts cannot be found. Locate !Fonts (on the Fonts disc).

SetEval SysABI 0
RMEnsure ABI 2.86 SetEval SysABI -1
IF "<System$Path>"="" Then SetEval SysABI 0
IF SysABI THEN Run <ImpressionPublisher$Dir>.FileEnsure system:Modules.ABIMod SysABI
IF SysABI THEN RMEnsure ABI 2.86 RMLoad system:Modules.ABIMod
IF SysABI THEN RMEnsure ABI 2.86 Error "ABIModule in !System is out of date. Please refer to the section 'Updating ABI' in the manual."
RMEnsure ABI 2.86 RMLoad <ImpressionPublisher$Resources>.RMStore.ABIMod
RMEnsure ABI 2.86 Error "The copy of ABI inside !Publisher is out of date. Impression Publisher may not have installed correctly. Please re-install Impression Publisher or seek technical help."
Unset SysABI

SetEval SysBootShare 0
If "<CCShared$Dir>"="" Then Run <ImpressionPublisher$Dir>.FileEnsure system:!CCShared.!Boot SysBootShare
If SysBootShare Then Obey system:!CCShared.!Boot
Unset SysBootShare

RMEnsure Impulse 0.18 RMLoad <ImpressionPublisher$Resources>.RMStore.ImpulseII
RMEnsure Impulse 0.18 Error 0 "The copy of Impulse inside !Publisher is out of date. Impression Publisher may not have installed correctly. Please re-install Impression Publisher or seek technical help."
Set DocumentManager$Scrap <Wimp$ScrapDir>.!Publisher

Set ImpSpell Present
Set OldImpSpell Present
RMEnsure ImpressionSpell 0.00 Set OldImpSpell NotPresent
RMEnsure ImpressionSpell 1.24 Set ImpSpell NotPresent
If "<ImpSpell>"="NotPresent" AND "<OldImpSpell>"="Present" THEN RmKill ImpressionSpell
Set ImpSpell Present
Set OldImpSpell Present
RMEnsure SpellMaster 0.00 Set OldImpSpell NotPresent
RMEnsure SpellMaster 1.24 Set ImpSpell NotPresent
If "<ImpSpell>"="NotPresent" AND "<OldImpSpell>"="Present" THEN RmKill SpellMaster
UnSet ImpSpell 
UnSet OldImpSpell

IconSprites <ImpressionPublisher$Dir>.!Sprites
Set File$Type_D87 DocData
Set File$Type_D88 Stories
Set File$Type_D89 IModule
Set File$Type_D8A Excep'ns
Set File$Type_D8B Abbrev
Set File$Type_D8E ABIDefs
Set File$Type_D94 ArtWork
Set File$Type_ff5 PoScript
Set File$Type_ff0 TIFF
Set File$Type_DFE CSV
Set File$Type_AFF DrawFile
Set File$Type_BC5 ImpDoc
Set File$Type_C25 AWord
Set File$Type_BD6 AudioWrk

Set Alias$@RunType_C25 "Run <ImpressionPublisher$Path> %%*0"
Set Alias$@PrintType_C25 "Run <ImpressionPublisher$Path> -print %%*0"
Set Alias$@RunType_BC5 "Run <ImpressionPublisher$Path> %%*0"
Set Alias$@PrintType_BC5 "Run <ImpressionPublisher$Path> -print %%*0"

If "<Impression$TimeFormat>"="" then Set Impression$TimeFormat "%z12:%mi:%se %pm"
If "<Impression$DateFormat>"="" then Set Impression$DateFormat "%zdy%st %mo %ce%yr"

WimpSlot -min 672K -max 672K
Run "<ImpressionPublisher$Dir>.!RunImage" %*0